<?php if ( ! defined('WDK_PATH')) exit('No direct script access allowed');?>
<!--{**************************************************************************}-->
<link rel="stylesheet" type="text/css" href="{default_css}" />
<!--{**************************************************************************}-->
<table id="listTable" class="list">
	<caption>
		<div class="fl">
			총 <span id="total">0</span>개의 등록된 그룹이 있습니다.
		</div>
		<div class="fr">
			<form id="searchForm" onsubmit="return false;">
				<select name="sf">
					<option value="">아이디</option>
				</select>
				<input type="text" name="sk" class="input"/>
				<a href="javascript:;" class="btn">검색</a>
			</form>
		</div>
	</caption>
	<colgroup>
		<col style="width:40px;"/>
		<col style="width:120px;"/>
		<col style="width:220px;"/>
		<col style="width:100px;"/>
		<col style="width:*;"/>
		<col style="width:140px;"/>
	</colgroup>
	<thead>
		<tr>
			<th>No</th>
			<th>아이디</th>
			<th>이름</th>
			<th>포인트</th>
			<th>내용</th>
			<th>시간</th>
		</tr>
	</thead>
	<tbody data='{json}'></tbody>
	<tfoot>
		<tr>
			<td colspan="11">
				<div class="fl">
					<a id="btn_new" class="btn" href="javascript:;">등록</a>
					<a id="btn_del" class="btn" href="javascript:;">선택삭제</a>
				</div>
				<div id="pagebar" class="fr"></div>
			</td>
		</tr>
	</tfoot>
</table>
{# plugin listmanager #}
<!--{**************************************************************************}-->
<script>
(function($){
	$('#btn_list').click(function(){
		location.href = $PATH;
	});
	$('#btn_new').click(function(){
		popup($PATH+'edit/', 750, 560, 'ue');
	});
	$('#btn_del').click(function(){
		wlm.del();
	});
	WdListManager.prototype.draw = function(json)
	{
		var tag = [];
		tag.push('<td class="tc"><input type="checkbox" value="'+json.seq+'"/></td>');
		tag.push('<td class="tc to">'+json.user_login_id+'</td>');
		tag.push('<td class="tc">'+json.user_name+'</td>');
		tag.push('<td class="tc to">'+json.amount+'</td>');
		tag.push('<td class="">&nbsp;'+json.memo+'</td>');
		tag.push('<td class="tc to">'+json.insert_time+'</td>');
		return tag.join("");
	};
	WdListManager.prototype.draw_event = function()
	{
		$(this.root+'>tbody>tr').map(function(){
			var self = $(this);
			self.find('.edit').click(function(){
				popup($PATH+'edit/'+self.find(':checkbox').val(), 750, 560, 'ue');
			});
		});
	};
	$(document).ready(function(){
		wlm = new WdListManager($PATH);
		wlm.set_root('#listTable');
		wlm.set_totalbox('#listTable #total');
		wlm.set_pagebar('#listTable #pagebar');
		wlm.preload();
	});
})(jQuery);
</script>
<!--{**************************************************************************}-->